and Makefile to never look for libusb on Windows.
+
VERSU=1_2_8
VERSD=1.2.8
# YYYYMMDD, please, if beta.
-RELEASE=-beta20060219
+RELEASE=-beta20060405
VERSIONU=$(VERSU)$(RELEASE)
VERSIOND=$(VERSD)$(RELEASE)
# type that is XML-ish (i.e. gpx or geocaching.com's/loc) you can uncomment
# INHIBIT_EXPAT and coment out LIBEXPAT on just to get a build working quickly.
# INHIBIT_EXPAT=-DNO_EXPAT
-LIBEXPAT=-lexpat # -lefence
-
-# USB may required non-standard libraries (like libusb) be installed
-# and may not be available on all OSes. Uncomment this to remove the key
-# parts of USB from the build.
-LIBUSB=-lusb
+LIBEXPAT= -L/usr/lib -lusb -lexpat # -lefence
# Space is significant, because MSVC wants no space between switch and arg (-Fofoo.o)
# but cc/gcc does:
OPTIMIZATION=-O $(EXTRA_OPTIMIZATION)
DEBUGGING=-g $(EXTRA_DEBUGGING)
# add -DDEBUG_MEM to turn on memory allocation logging
-CFLAGS=$(EXTRA_CFLAGS) $(DEBUGGING) -Icoldsync $(INHIBIT_EXPAT) $(INHIBIT_USB) $(OPTIMIZATION)
+GBCFLAGS=$(EXTRA_CFLAGS) $(DEBUGGING) -I./coldsync \
+ $(INHIBIT_USB) $(OPTIMIZATION) -g -O2
INSTALL_TARGETDIR=/usr/local/
-#OTHER_ROOT=/opt/local # For DarwinPorts on OSX
-OTHER_ROOT=/sw # Uncomment For Fink on OS X.
+# OTHER_ROOT=/opt/local # For DarwinPorts on OSX
+# OTHER_ROOT=/sw # Uncomment For Fink on OS X.
FMTS=magproto.o gpx.o geo.o mapsend.o mapsource.o garmin_tables.o \
gtm.o \
reverse_route.o sort.o stackfilter.o trackfilter.o discard.o \
nukedata.o interpolate.o
-OSJEEPS=jeeps/gpslibusb.o
JEEPS=jeeps/gpsapp.o jeeps/gpscom.o \
jeeps/gpsmath.o jeeps/gpsmem.o \
jeeps/gpsprot.o jeeps/gpsread.o \
jeeps/gpsrqst.o jeeps/gpssend.o jeeps/gpsserial.o jeeps/gpsutil.o \
- jeeps/gpsusbread.o jeeps/gpsusbsend.o jeeps/gpsusbstub.o $(OSJEEPS)
+ jeeps/gpsusbread.o jeeps/gpsusbsend.o jeeps/gpslibusb.o
+
# Extra modules in Jeeps that we don't use
# jeeps/gpsfmt.o jeeps/gpsinput.o jeeps/gpsproj.o
OBJS = main.o globals.o $(LIBOBJS)
.c.o:
- $(CC) -c $(CFLAGS) $< $(OUTPUT_SWITCH)$@
+ gcc -c $(GBCFLAGS) $< $(OUTPUT_SWITCH)$@
+
+
# Directory of web doc
WEB=../babelweb/
-all: gpsbabel
-
-#
-# Alternate makefile target for the case when you have no libusb and no
-# need for Garmin/USB (60, 76C, VistaC, Quest, etc.) support.
-#
-usbfree:
- make LIBUSB= INHIBIT_USB=-DNO_USB
+all: gpsbabel$(EXEEXT)
-gpsbabel: $(OBJS)
- $(CC) $(CFLAGS) $(OBJS) $(LIBEXPAT) $(LIBUSB) -lm $(OUTPUT_SWITCH)$@
+gpsbabel$(EXEEXT): $(OBJS)
+ gcc $(CFLAGS) $(OBJS) -lm -L/usr/lib -lusb $(LIBEXPAT) $(OUTPUT_SWITCH)$@
globals.o:
- $(CC) -c $(CFLAGS) -DVERSION=\"$(VERSIOND)\" $< $(OUTPUT_SWITCH)$@
+ gcc -c $(GBCFLAGS) -DVERSION=\"$(VERSIOND)\" $< $(OUTPUT_SWITCH)$@
+
+jeeps/gpslibusb.o:
+ gcc -c $(GBCFLAGS) jeeps/gpslibusb.c $(OUTPUT_SWITCH)$@
clean:
rm -f $(OBJS) gpsbabel gpsbabel.exe
# Requires CLASSPATH be exported to include full path to saxon.jar.
# (typically /usr/share/java on a Linux system.)
readme.html: readme.xml
- java com.icl.saxon.StyleSheet $< \
- /usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl \
- html.stylesheet="http://www.gpsbabel.org/style3.css" > $@ || rm $@
+ xsltproc --stringparam html.stylesheet \
+ "http://www.gpsbabel.org/style3.css" \
+ http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl \
+ $< > $@ || rm $@
+# java com.icl.saxon.StyleSheet $< \
+# /usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl \
+# html.stylesheet="http://www.gpsbabel.org/style3.css" > $@ || rm $@
cp readme.html $(WEB)/readme.xhtml
tools/mkcapabilities
curl -u anonymous:anonymous --upload-file /usr/src/redhat/SRPMS/gpsbabel-$(VERSIOND).src.rpm ftp://upload.sf.net/incoming/
curl -u anonymous:anonymous --upload-file /usr/src/redhat/RPMS/i386/gpsbabel-$(VERSIOND).i386.rpm ftp://upload.sf.net/incoming/
-mac-usbfree:
- make LIBEXPAT=$(OTHER_ROOT)/lib/libexpat.a EXTRA_CFLAGS="-I$(OTHER_ROOT)/include" LIBUSB= INHIBIT_USB=-DNO_USB
-
-mac-build:
- make LIBEXPAT=$(OTHER_ROOT)/lib/libexpat.a EXTRA_CFLAGS="-I$(OTHER_ROOT)/include" LIBUSB="$(OTHER_ROOT)/lib/libusb.a -lIOKit -lBSDPClient -framework CoreFoundation"
-
mac-release:
mkdir -p usr/bin usr/share/gpsbabel/doc
cp gpsbabel usr/bin/
easygps.o: easygps.c defs.h queue.h gbtypes.h cet.h cet_util.h
fatal.o: fatal.c defs.h queue.h gbtypes.h cet.h cet_util.h
filter_vecs.o: filter_vecs.c defs.h queue.h gbtypes.h cet.h cet_util.h \
- filterdefs.h inifile.h
+ filterdefs.h
formspec.o: formspec.c defs.h queue.h gbtypes.h cet.h cet_util.h
garmin.o: garmin.c defs.h queue.h gbtypes.h cet.h cet_util.h jeeps/gps.h \
jeeps/../defs.h jeeps/gpsport.h jeeps/gpsserial.h jeeps/gps.h \
jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h \
jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h \
garmin_tables.h
-garmin_fs.o: garmin_fs.c garmin_fs.h defs.h garmin_tables.h inifile.h
-garmin_tables.o: garmin_tables.c garmin_tables.h defs.h
-garmin_txt.o: garmin_txt.c defs.h strptime.h cet_util.h csv_util.h \
- garmin_fs.h inifile.h jeeps/gpsmath.h garmin_tables.h grtcirc.h
+garmin_tables.o: garmin_tables.c garmin_tables.h
gcdb.o: gcdb.c defs.h queue.h gbtypes.h cet.h cet_util.h coldsync/palm.h \
coldsync/../gbtypes.h coldsync/pdb.h
gdb.o: gdb.c defs.h queue.h gbtypes.h cet.h cet_util.h garmin_tables.h \
gpspilot.o: gpspilot.c defs.h queue.h gbtypes.h cet.h cet_util.h \
coldsync/palm.h coldsync/../gbtypes.h coldsync/pdb.h
gpsutil.o: gpsutil.c defs.h queue.h gbtypes.h cet.h cet_util.h magellan.h
-gpx.o: gpx.c defs.h queue.h gbtypes.h cet.h cet_util.h xmlgeneric.h \
- garmin_fs.h
+gpx.o: gpx.c defs.h queue.h gbtypes.h cet.h cet_util.h xmlgeneric.h
grtcirc.o: grtcirc.c defs.h queue.h gbtypes.h cet.h cet_util.h
gtm.o: gtm.c defs.h queue.h gbtypes.h cet.h cet_util.h jeeps/gpsmath.h \
jeeps/gps.h jeeps/../defs.h jeeps/gpsport.h jeeps/gpsserial.h \
coldsync/palm.h coldsync/../gbtypes.h coldsync/pdb.h
magproto.o: magproto.c defs.h queue.h gbtypes.h cet.h cet_util.h \
magellan.h
-main.o: main.c defs.h queue.h gbtypes.h cet.h cet_util.h filterdefs.h inifile.h
+main.o: main.c defs.h queue.h gbtypes.h cet.h cet_util.h filterdefs.h
mapsend.o: mapsend.c defs.h queue.h gbtypes.h cet.h cet_util.h mapsend.h \
magellan.h
mapsource.o: mapsource.c defs.h queue.h gbtypes.h cet.h cet_util.h \
jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h \
jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h \
jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h
-vecs.o: vecs.c defs.h queue.h gbtypes.h cet.h cet_util.h csv_util.h inifile.h
+vecs.o: vecs.c defs.h queue.h gbtypes.h cet.h cet_util.h csv_util.h
vitosmt.o: vitosmt.c defs.h queue.h gbtypes.h cet.h cet_util.h
vmem.o: vmem.c defs.h queue.h gbtypes.h cet.h cet_util.h
waypt.o: waypt.c defs.h queue.h gbtypes.h cet.h cet_util.h
OPTIMIZATION=-O $(EXTRA_OPTIMIZATION)
DEBUGGING=-g $(EXTRA_DEBUGGING)
# add -DDEBUG_MEM to turn on memory allocation logging
-GBCFLAGS=$(EXTRA_CFLAGS) $(DEBUGGING) -I@srcdir@/coldsync \
+GBCFLAGS=$(EXTRA_CFLAGS) $(DEBUGGING) -I. -I@srcdir@/coldsync \
$(INHIBIT_USB) $(OPTIMIZATION) @CFLAGS@
INSTALL_TARGETDIR=/usr/local/
OBJS = main.o globals.o $(LIBOBJS)
.c.o:
- @CC@ -c $(GBCFLAGS) $< $(OUTPUT_SWITCH)$@
+ @CC@ @CPPFLAGS@ -c $(GBCFLAGS) $< $(OUTPUT_SWITCH)$@
WEB=../babelweb/
-all: gpsbabel
+all: gpsbabel@EXEEXT@
-gpsbabel: $(OBJS)
+gpsbabel@EXEEXT@: $(OBJS)
@CC@ $(CFLAGS) $(OBJS) @LIBS@ @USB_LIBS@ $(LIBEXPAT) $(OUTPUT_SWITCH)$@
globals.o:
- @CC@ -c $(GBCFLAGS) -DVERSION=\"$(VERSIOND)\" $< $(OUTPUT_SWITCH)$@
+ @CC@ @CPPFLAGS@ -c $(GBCFLAGS) -DVERSION=\"$(VERSIOND)\" $< $(OUTPUT_SWITCH)$@
jeeps/gpslibusb.o:
- @CC@ -c $(GBCFLAGS) @USB_CFLAGS@ jeeps/gpslibusb.c $(OUTPUT_SWITCH)$@
+ @CC@ @CPPFLAGS@ -c $(GBCFLAGS) @USB_CFLAGS@ @srcdir@/jeeps/gpslibusb.c $(OUTPUT_SWITCH)$@
clean:
rm -f $(OBJS) gpsbabel gpsbabel.exe
(echo -n "internal_styles.c: mkstyle.sh " ; echo style/*.style ; /bin/echo -e '\t./mkstyle.sh > internal_styles.c || (rm -f internal_styles.c ; exit 1)' ) >> /tmp/dep
echo Edit Makefile and bring in /tmp/dep
-# Doc targets have large external requirements.
-# Requires saxon6, not saxon8. Saxon requires Java.
-# Requires hardcoded pathnames to installed docbook both in the
-# source file and on this command like. (Ick.)
-# Requires CLASSPATH be exported to include full path to saxon.jar.
-# (typically /usr/share/java on a Linux system.)
readme.html: readme.xml
xsltproc --stringparam html.stylesheet \
"http://www.gpsbabel.org/style3.css" \
http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl \
$< > $@ || rm $@
-# java com.icl.saxon.StyleSheet $< \
-# /usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl \
-# html.stylesheet="http://www.gpsbabel.org/style3.css" > $@ || rm $@
cp readme.html $(WEB)/readme.xhtml
tools/mkcapabilities
xmlgeneric.h
xmltag.o: xmltag.c defs.h queue.h gbtypes.h cet.h cet_util.h
yahoo.o: yahoo.c defs.h queue.h gbtypes.h cet.h cet_util.h xmlgeneric.h
-coldsync/pdb.o: coldsync/pdb.c coldsync/config.h coldsync/palm.h \
+coldsync/pdb.o: coldsync/pdb.c coldsync/cs-config.h coldsync/palm.h \
coldsync/../gbtypes.h coldsync/pdb.h
-coldsync/util.o: coldsync/util.c coldsync/config.h coldsync/pconn/util.h \
+coldsync/util.o: coldsync/util.c coldsync/cs-config.h coldsync/pconn/util.h \
coldsync/palm.h coldsync/../gbtypes.h
jeeps/gpsapp.o: jeeps/gpsapp.c jeeps/gps.h jeeps/../defs.h \
jeeps/../queue.h jeeps/../gbtypes.h jeeps/../cet.h jeeps/../cet_util.h \
+++ /dev/null
-/*
- * Assume we're on a conformant ISO C platform.
- */
-
-
-#define STDC_HEADERS 1
-#define _(str) str
-#define inline
--- /dev/null
+/*
+ * Assume we're on a conformant ISO C platform.
+ */
+
+
+#define STDC_HEADERS 1
+#define _(str) str
+#define inline
* You may distribute this file under the terms of the Artistic
* License, as specified in the README file.
*
- * $Id: pdb.c,v 1.9 2006-02-20 21:59:19 robertl Exp $
+ * $Id: pdb.c,v 1.10 2006-04-09 02:11:34 robertl Exp $
*/
/* XXX - The way zero-length records are handled is a bit of a kludge. They
* shouldn't normally exist, with the exception of expunged records. But,
* Debugging messages should go to 'FILE *pdb_logfile'.
*/
-#include "config.h"
+#include "cs-config.h"
#include <stdio.h>
#include <fcntl.h> /* For open() */
#include <sys/types.h>
* native format, convert them to Palm (big-endian) format, and write
* them to a ubyte string.
*
- * $Id: util.c,v 1.4 2005-03-18 03:56:35 robertl Exp $
+ * $Id: util.c,v 1.5 2006-04-09 02:11:34 robertl Exp $
*/
-#include "config.h"
+#include "cs-config.h"
#include <stdio.h>
#include <ctype.h> /* For isprint() */
#include <pconn/util.h>
PACKAGE_STRING='GPSBabel VERSION'
PACKAGE_BUGREPORT='BUG-REPORT-ADDRESS'
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE LIBUSBCONFIG USB_LIBS USB_CFLAGS OSJEEPS EXPAT_LIB LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE LIBUSBCONFIG USB_LIBS USB_CFLAGS OSJEEPS EXPAT_LIB LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
_ACEOF
cat <<\_ACEOF
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
_ACEOF
fi
ac_config_headers="$ac_config_headers config.h"
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+ ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
# Checks for programs.
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f $ac_dir/shtool; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
fi
+
+
# Checks for libraries.
-# FIXME: Replace `main' with a function in `-lBSDPClient':
-# AC_CHECK_LIB([BSDPClient], [main])
-# FIXME: Replace `main' with a function in `-lIOKit':
-# AC_CHECK_LIB([IOKit], [main])
-# FIXME: Replace `main' with a function in `-lexpat':
-# AC_CHECK_LIB([expat], [XML_ParserCreate])
-# FIXME: Replace `main' with a function in `-lm':
echo "$as_me:$LINENO: checking for cos in -lm" >&5
fi
-# FIXME: Replace `main' with a function in `-lsetupapi':
-# AC_CHECK_LIB([setupapi], [main])
-# FIXME: Replace `main' with a function in `-lusb':
-# AC_CHECK_LIB([usb], [usb_open])
-echo "$as_me:$LINENO: checking for libusb" >&5
+
+case "$target" in
+ *-*-cygwin* | *-*-mingw32*)
+ OSJEEPS=jeeps/gpsusbwin.o
+ USB_LIBS=-lsetupapi
+ ;;
+ *)
+ echo "$as_me:$LINENO: checking for libusb" >&5
echo $ECHO_N "checking for libusb... $ECHO_C" >&6
-if test "$with_libusb" = no ; then
- echo "$as_me:$LINENO: result: check not done" >&5
+ if test "$with_libusb" = no ; then
+ echo "$as_me:$LINENO: result: check not done" >&5
echo "${ECHO_T}check not done" >&6
- OSJEEPS=jeeps/gpsusbstub.o
-else
- # Extract the first word of "libusb-config", so it can be a program name with args.
+ OSJEEPS=jeeps/gpsusbstub.o
+ else
+ # Extract the first word of "libusb-config", so it can be a program name with args.
set dummy libusb-config; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
echo "${ECHO_T}no" >&6
fi
- if test "$LIBUSBCONFIG" = false; then
- { { echo "$as_me:$LINENO: error: libusb-config not found in $PATH" >&5
+ if test "$LIBUSBCONFIG" = false; then
+ { { echo "$as_me:$LINENO: error: libusb-config not found in $PATH" >&5
echo "$as_me: error: libusb-config not found in $PATH" >&2;}
{ (exit 1); exit 1; }; }
- fi;
- OLDFLAGS=$LDFLAGS
- OCFLAGS=$CFLAGS
- LDFLAGS="$LDFLAGS `libusb-config --libs`"
- CFLAGS="$OCFLAGS `libusb-config --cflags`"
+ fi;
+ OLDFLAGS=$LDFLAGS
+ OCFLAGS=$CFLAGS
+ LDFLAGS="$LDFLAGS `libusb-config --libs`"
+ CFLAGS="$OCFLAGS `libusb-config --cflags`"
- echo "$as_me:$LINENO: checking for usb_interrupt_read in -lusb" >&5
+ echo "$as_me:$LINENO: checking for usb_interrupt_read in -lusb" >&5
echo $ECHO_N "checking for usb_interrupt_read in -lusb... $ECHO_C" >&6
if test "${ac_cv_lib_usb_usb_interrupt_read+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
#define HAVE_LIBUSB 1
_ACEOF
- USB_CFLAGS="`libusb-config --cflags`"
- USB_LIBS="`libusb-config --libs`"
+ USB_CFLAGS="`libusb-config --cflags`"
+ USB_LIBS="`libusb-config --libs`"
else
{ { echo "$as_me:$LINENO: error: libusb >= 0.1.8 is needed" >&5
echo "$as_me: error: libusb >= 0.1.8 is needed" >&2;}
fi
- OSJEEPS=jeeps/gpslibusb.o
- CFLAGS="$OCFLAGS"
-# LIBS="$LIBS `libusb-config --libs`"
-fi
+ OSJEEPS=jeeps/gpslibusb.o
+ CFLAGS="$OCFLAGS"
+ # LIBS="$LIBS `libusb-config --libs`"
+ fi
+ ;;
+esac
done
-#AC_CONFIG_FILES([Makefile
-# coldsync/Makefile
-# doc/Makefile
-# mingw/Makefile])
- ac_config_files="$ac_config_files Makefile"
+# coldsync, shapelib, and jeeps are here just so the target directories are
+# created.
+ ac_config_files="$ac_config_files Makefile shapelib/Makefile coldsync/Makefile jeeps/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
case "$ac_config_target" in
# Handling of arguments.
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "shapelib/Makefile" ) CONFIG_FILES="$CONFIG_FILES shapelib/Makefile" ;;
+ "coldsync/Makefile" ) CONFIG_FILES="$CONFIG_FILES coldsync/Makefile" ;;
+ "jeeps/Makefile" ) CONFIG_FILES="$CONFIG_FILES jeeps/Makefile" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
+AC_EXEEXT
+AC_SUBST(AC_EXEEXT)
# Checks for libraries.
-# FIXME: Replace `main' with a function in `-lBSDPClient':
-# AC_CHECK_LIB([BSDPClient], [main])
-# FIXME: Replace `main' with a function in `-lIOKit':
-# AC_CHECK_LIB([IOKit], [main])
-# FIXME: Replace `main' with a function in `-lexpat':
-# AC_CHECK_LIB([expat], [XML_ParserCreate])
-# FIXME: Replace `main' with a function in `-lm':
AC_CHECK_LIB([m], [cos])
-# FIXME: Replace `main' with a function in `-lsetupapi':
-# AC_CHECK_LIB([setupapi], [main])
-# FIXME: Replace `main' with a function in `-lusb':
-# AC_CHECK_LIB([usb], [usb_open])
-
-AC_MSG_CHECKING(for libusb)
-if test "$with_libusb" = no ; then
- AC_MSG_RESULT(check not done)
- case "$target" in
- *-*-cygwin* | *-*-mingw32*)
- OSJEEPS=jeeps/gpsusbwin.o
- USB_LIBS=-lsetupapi;;
- *)
+case "$target" in
+ *-*-cygwin* | *-*-mingw32*)
+ OSJEEPS=jeeps/gpsusbwin.o
+ USB_LIBS=-lsetupapi
+ ;;
+ *)
+ AC_MSG_CHECKING(for libusb)
+ if test "$with_libusb" = no ; then
+ AC_MSG_RESULT(check not done)
OSJEEPS=jeeps/gpsusbstub.o
- esac;
-else
- AC_CHECK_PROG(LIBUSBCONFIG, libusb-config, true, false)
- if test "$LIBUSBCONFIG" = false; then
- AC_MSG_ERROR([libusb-config not found in $PATH])
- fi;
- OLDFLAGS=$LDFLAGS
- OCFLAGS=$CFLAGS
- LDFLAGS="$LDFLAGS `libusb-config --libs`"
- CFLAGS="$OCFLAGS `libusb-config --cflags`"
-
- AC_CHECK_LIB([usb], [usb_interrupt_read],
- AC_DEFINE(HAVE_LIBUSB, 1, [Defined if you have libusb])
- [USB_CFLAGS="`libusb-config --cflags`"]
- [USB_LIBS="`libusb-config --libs`"],
- [AC_MSG_ERROR([libusb >= 0.1.8 is needed])]
- )
- OSJEEPS=jeeps/gpslibusb.o
- CFLAGS="$OCFLAGS"
-# LIBS="$LIBS `libusb-config --libs`"
-fi
+ else
+ AC_CHECK_PROG(LIBUSBCONFIG, libusb-config, true, false)
+ if test "$LIBUSBCONFIG" = false; then
+ AC_MSG_ERROR([libusb-config not found in $PATH])
+ fi;
+ OLDFLAGS=$LDFLAGS
+ OCFLAGS=$CFLAGS
+ LDFLAGS="$LDFLAGS `libusb-config --libs`"
+ CFLAGS="$OCFLAGS `libusb-config --cflags`"
+
+ AC_CHECK_LIB([usb], [usb_interrupt_read],
+ AC_DEFINE(HAVE_LIBUSB, 1, [Defined if you have libusb])
+ [USB_CFLAGS="`libusb-config --cflags`"]
+ [USB_LIBS="`libusb-config --libs`"],
+ [AC_MSG_ERROR([libusb >= 0.1.8 is needed])]
+ )
+ OSJEEPS=jeeps/gpslibusb.o
+ CFLAGS="$OCFLAGS"
+ # LIBS="$LIBS `libusb-config --libs`"
+ fi
+ ;;
+esac
AC_SUBST(USB_LIBS)
AC_SUBST(USB_CFLAGS)
# AC_CHECK_FUNCS([atexit floor localtime_r memmove memset pow select sqrt strchr strcspn strdup strerror strncasecmp strrchr strspn strstr strtol strtoul])
AC_CHECK_FUNCS([nanosleep sleep])
-#AC_CONFIG_FILES([Makefile
-# coldsync/Makefile
-# doc/Makefile
-# mingw/Makefile])
-AC_CONFIG_FILES([Makefile])
+# coldsync, shapelib, and jeeps are here just so the target directories are
+# created.
+AC_CONFIG_FILES([Makefile shapelib/Makefile coldsync/Makefile jeeps/Makefile])
AC_OUTPUT
#include <stdio.h>
#include <ctype.h>
-#include "../config.h"
+#include "config.h"
#if HAVE_LIBUSB
#include <usb.h>
#include "gps.h"